package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.AgentProductManageFallBack;
import cn.cs.pojo.AgentShop;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(name = "cs-shop-provider", configuration = CsConfiguration.class, fallback = AgentProductManageFallBack.class)
public interface AgentProductManageClient {
    @RequestMapping(value = "/cellProdctList", method = RequestMethod.POST)
    List<Map<String,Object>> cellProdctList(@RequestParam("id") String id);
//    @RequestMapping(value = "/getAgentShopByAgentId", method = RequestMethod.POST)
//    AgentShop getAgentShopByAgentId(@RequestParam("id")String id);
    @RequestMapping(value = "/addCellProdct", method = RequestMethod.POST)
    int addCellProdct(@RequestBody  Map<String, Object> pro);
    @RequestMapping(value = "/insertCellProImg", method = RequestMethod.POST)
    int insertCellProImg(@RequestBody Map<String, Object> map);
    @RequestMapping(value = "/updateCellProdct", method = RequestMethod.POST)
    int updateCellProdct(@RequestBody Map<String, Object> pro);
    @RequestMapping(value = "/deleteProImageById", method = RequestMethod.POST)
    int deleteProImageById(@RequestParam("id") String id);
    @RequestMapping(value = "/getProImageById", method = RequestMethod.POST)
    Map<String,Object> getProImageById(@RequestParam("id") String id);
    @RequestMapping(value = "/deleteProdct", method = RequestMethod.POST)
    int deleteProdct(@RequestParam("id") String id);
}
